home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / S / Simple Sockets 1.0.1.sit / Simple Sockets 1.0.1 ƒ / butil ƒ / butil.c next >
MacBinary  |  1995-04-09  |  1.5 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: butil.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Apr 9 14:30:26 1995, modified Sun Apr 9 14:30:26 1995, creator 'MMCC', type ASCII, 807 bytes "butil.c" , at 0x3a7 456 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 62 75 74 69 6c 2e | 63 00 00 00 00 00 00 00 |..butil.|c.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 03 27 00 | 00 01 c8 ab ad d8 42 ab |......'.|......B.|
|00000060| ad d8 42 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..B.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a3 16 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 62 75 | 74 69 6c 2e 63 0d 20 2a |/*. * bu|til.c. *|
|00000090| 0d 20 2a 20 54 68 69 73 | 20 69 73 20 61 20 71 75 |. * This| is a qu|
|000000a0| 69 63 6b 20 6d 6f 64 75 | 6c 65 20 69 20 77 68 69 |ick modu|le i whi|
|000000b0| 70 70 65 64 20 75 70 20 | 74 6f 20 70 72 6f 76 69 |pped up |to provi|
|000000c0| 64 65 20 74 68 65 20 75 | 6e 69 78 20 62 69 6e 61 |de the u|nix bina|
|000000d0| 72 79 20 28 62 2a 29 20 | 72 6f 75 74 69 6e 65 73 |ry (b*) |routines|
|000000e0| 2e 0d 20 2a 20 54 68 65 | 79 20 77 6f 72 6b 20 6c |.. * The|y work l|
|000000f0| 61 72 67 65 6c 79 20 6f | 6e 20 62 72 75 74 65 20 |argely o|n brute |
|00000100| 66 6f 72 63 65 20 70 72 | 69 6e 63 69 70 6c 65 73 |force pr|inciples|
|00000110| 2c 20 61 6e 64 20 61 72 | 65 6e 27 74 20 6f 70 74 |, and ar|en't opt|
|00000120| 6f 6d 69 7a 65 64 20 61 | 74 20 61 6c 6c 2e 20 20 |omized a|t all. |
|00000130| 41 6e 79 0d 20 2a 20 73 | 75 67 67 65 73 74 69 6f |Any. * s|uggestio|
|00000140| 6e 73 20 66 6f 72 20 62 | 65 74 74 65 72 20 63 6f |ns for b|etter co|
|00000150| 64 65 20 77 69 6c 6c 20 | 62 65 20 67 72 65 61 74 |de will |be great|
|00000160| 6c 79 20 61 70 70 72 65 | 63 69 61 74 65 64 2e 0d |ly appre|ciated..|
|00000170| 20 2a 0d 20 2a 20 4d 69 | 6b 65 20 54 72 65 6e 74 | *. * Mi|ke Trent|
|00000180| 20 38 2f 39 34 0d 20 2a | 2f 0d 0d 23 69 6e 63 6c | 8/94. *|/..#incl|
|00000190| 75 64 65 20 22 62 75 74 | 69 6c 2e 68 22 0d 0d 2f |ude "but|il.h"../|
|000001a0| 2a 20 62 63 6f 70 79 0d | 20 2a 20 2d 20 43 6f 70 |* bcopy.| * - Cop|
|000001b0| 79 20 62 69 6e 61 72 79 | 20 64 61 74 61 20 66 72 |y binary| data fr|
|000001c0| 6f 6d 20 62 32 20 74 6f | 20 62 31 0d 20 2a 2f 0d |om b2 to| b1. */.|
|000001d0| 76 6f 69 64 20 62 63 6f | 70 79 20 28 63 68 61 72 |void bco|py (char|
|000001e0| 20 2a 62 31 2c 20 63 68 | 61 72 20 2a 62 32 2c 20 | *b1, ch|ar *b2, |
|000001f0| 6c 6f 6e 67 20 6c 65 6e | 67 74 68 29 0d 7b 0d 09 |long len|gth).{..|
|00000200| 6c 6f 6e 67 20 78 3b 0d | 09 66 6f 72 20 28 78 20 |long x;.|.for (x |
|00000210| 3d 30 3b 20 78 3c 6c 65 | 6e 67 74 68 3b 20 78 2b |=0; x<le|ngth; x+|
|00000220| 2b 29 20 7b 0d 09 09 62 | 32 5b 78 5d 20 3d 20 62 |+) {...b|2[x] = b|
|00000230| 31 5b 78 5d 3b 0d 09 7d | 0d 7d 0d 0d 69 6e 74 20 |1[x];..}|.}..int |
|00000240| 62 63 6d 70 20 28 63 68 | 61 72 20 2a 62 31 2c 20 |bcmp (ch|ar *b1, |
|00000250| 63 68 61 72 20 2a 62 32 | 2c 20 6c 6f 6e 67 20 6c |char *b2|, long l|
|00000260| 65 6e 67 74 68 29 0d 7b | 0d 09 6c 6f 6e 67 20 78 |ength).{|..long x|
|00000270| 3b 0d 09 66 6f 72 20 28 | 78 3d 30 3b 20 78 3c 6c |;..for (|x=0; x<l|
|00000280| 65 6e 67 74 68 3b 20 78 | 2b 2b 29 20 7b 0d 09 09 |ength; x|++) {...|
|00000290| 69 66 20 28 62 31 5b 78 | 5d 20 21 3d 20 62 32 5b |if (b1[x|] != b2[|
|000002a0| 78 5d 29 20 72 65 74 75 | 72 6e 20 2d 31 3b 0d 09 |x]) retu|rn -1;..|
|000002b0| 7d 0d 09 72 65 74 75 72 | 6e 20 30 3b 0d 7d 0d 0d |}..retur|n 0;.}..|
|000002c0| 76 6f 69 64 20 62 7a 65 | 72 6f 20 28 63 68 61 72 |void bze|ro (char|
|000002d0| 20 2a 64 61 74 61 2c 20 | 6c 6f 6e 67 20 73 69 7a | *data, |long siz|
|000002e0| 65 29 0d 7b 0d 09 6c 6f | 6e 67 20 78 3b 0d 09 63 |e).{..lo|ng x;..c|
|000002f0| 68 61 72 20 7a 65 72 6f | 20 3d 20 30 3b 0d 0d 09 |har zero| = 0;...|
|00000300| 66 6f 72 20 28 78 20 3d | 20 30 3b 20 78 3c 73 69 |for (x =| 0; x<si|
|00000310| 7a 65 3b 20 78 2b 2b 29 | 20 7b 0d 09 09 64 61 74 |ze; x++)| {...dat|
|00000320| 61 5b 78 5d 3d 20 7a 65 | 72 6f 3b 0d 09 7d 0d 7d |a[x]= ze|ro;..}.}|
|00000330| 0d 0d 6c 6f 6e 67 20 66 | 66 73 20 28 6c 6f 6e 67 |..long f|fs (long|
|00000340| 20 69 29 0d 7b 0d 09 6c | 6f 6e 67 20 78 3d 30 3b | i).{..l|ong x=0;|
|00000350| 0d 09 0d 09 69 66 20 28 | 69 20 3d 3d 20 30 29 20 |....if (|i == 0) |
|00000360| 72 65 74 75 72 6e 20 30 | 3b 0d 09 0d 09 77 68 69 |return 0|;....whi|
|00000370| 6c 65 20 28 31 29 20 7b | 0d 09 09 69 66 20 28 69 |le (1) {|...if (i|
|00000380| 20 26 20 28 31 20 3c 3c | 20 78 29 29 20 72 65 74 | & (1 <<| x)) ret|
|00000390| 75 72 6e 20 28 78 2b 31 | 29 3b 0d 09 09 78 2b 2b |urn (x+1|);...x++|
|000003a0| 3b 0d 09 7d 0d 7d 09 00 | 00 00 00 00 00 00 00 00 |;..}.}..|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 07 62 75 74 69 6c 2e 63 | 02 00 00 00 50 61 72 74 |.butil.c|....Part|
|00000440| 53 49 54 21 00 00 00 00 | 00 00 00 00 00 02 ab ac |SIT!....|........|
|00000450| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 ab f8 9c 73 00 00 | 00 00 00 00 01 c8 00 00 |.....s..|........|
|00000480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 1e 00 2a 00 03 | 03 57 01 ff 00 4f 00 20 |.....*..|.W...O. |
|00000510| 01 dc 02 3d 00 00 00 00 | 00 00 00 00 00 00 00 00 |...=....|........|
|00000520| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 5b 00 12 |........|.....[..|
|00000550| 01 d5 02 76 00 5b 00 12 | 01 d5 02 76 ab ad 92 0f |...v.[..|...v....|
|00000560| 00 00 01 05 00 00 01 05 | 00 00 01 b9 00 00 00 00 |........|........|
|00000570| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00000580| 00 76 00 00 00 52 00 59 | ad 98 1a 14 00 00 00 1c |.v...R.Y|........|
|00000590| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|000005a0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|000005b0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|000005c0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+